home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Palettes
/
PSAction
/
palette.make_3.1
< prev
next >
Wrap
Text File
|
1995-06-12
|
5KB
|
125 lines
#
# palette.make
#
# Inputs from Makefile.preamble (no defaults):
# OTHER_CFLAGS - Flags passed to compiler (in addition to -g, -O, etc.)
# PALETTELDFLAGS - Additional flags passed to ld when linking palettes
# OTHER_LDFLAGS - Flags passed to ld (in addition to -ObjC, etc.)
# OTHER_OFILES - Additional relocatables that may be linked in
# OTHER_PRODUCT_DEPENDS - Other dependencies of this project
# OTHER_SOURCEFILES - Other source files maintained by .pre/postamble
# OTHER_GARBAGE - Additional files to be removed by make 'clean'
# PRECOMPS - Precompiled headers that should be built before compilation
# OTHER_INITIAL_TARGETS - Targets to be built before subprojects, etc.
#
# MSGFILES - .msg files that should have msgwrap run on them
# DEFSFILES - .defs files that should have mig run on them
# MIGFILES - .mig files (no .defs files) that should have mig run on them
#
# DSTROOT - Virtual root directory prepended to $(INSTALLDIR)
#
# Inputs from Makefile.preamble (with defaults set here or in common.make):
# NORMAL_CFLAGS - Flags passed to compiler in normal compiles
# MAKEFILES - Makefiles this project depends on (default = Makefile)
# DEFAULT_CFLAGS - All compiler flags for this level (default set below)
#
# Inputs from Makefile (avoid setting these, ProjectBuilder controls them):
# NAME - name of application
# LANGUAGE - langage in which the project is written (default "English")
# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
# GLOBAL_RESOURCES - non-localized resources of project
#
# CLASSES - Class implementation files in project.
# HFILES - Header files in project.
# MFILES - Other Objective-C source files in project.
# CFILES - Other C source files in project.
# PSWFILES - .psw files in the project
# PSWMFILES - .pswm files in the project
# SUBPROJECTS - Subprojects of this project
# BUNDLES - Bundle subprojects of this project
# OTHERSRCS - Other miscellaneous sources of this project
# OTHERLINKED - Source files not matching a standard source extention
# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
APP_MAKEFILE_DIR = /NextDeveloper/Makefiles/app
include $(APP_MAKEFILE_DIR)/common.make
include $(APP_MAKEFILE_DIR)/specialrules.make
all:: palette
palette::
@(evaled_rc_archs="$(RC_ARCHS)"; \
obj_dir=`echo $$evaled_rc_archs | sed 's/ /_/g'`_obj ; \
$(MAKE) project \
"OFILE_DIR = $(OBJROOT)/$$obj_dir" \
"PROJ_CFLAGS = $(NORMAL_CFLAGS)" \
"MAKEFILEDIR = $(MAKEFILEDIR)" \
"RC_CFLAGS = $(RC_CFLAGS)" \
"SRCROOT = $(SRCROOT)" \
"OBJROOT = $(OBJROOT)" \
"PRODUCT_ROOT = $(SYMROOT)/$(NAME).palette" \
"SYMROOT = $(SYMROOT)/sym" \
"SYM_DIR = $(SYMROOT)/sym" )
debug::
@(evaled_rc_archs="$(RC_ARCHS)"; \
obj_dir=`echo $$evaled_rc_archs | sed 's/ /_/g'`_debug_obj ; \
$(MAKE) project \
"OFILE_DIR = $(OBJROOT)/$$obj_dir" \
"PROJ_CFLAGS = $(DEBUG_CFLAGS)" \
"MAKEFILEDIR = $(MAKEFILEDIR)" \
"RC_CFLAGS = $(RC_CFLAGS)" \
"SRCROOT = $(SRCROOT)" \
"OBJROOT = $(OBJROOT)" \
"PRODUCT_ROOT = $(SYMROOT)/$(NAME).palette" \
"SYMROOT = $(SYMROOT)/sym" \
"SYM_DIR = $(SYMROOT)/sym" )
project:: $(INITIAL_TARGETS) subprojs bundles resources $(PRODUCT_ROOT)/$(NAME)
$(PRODUCT_ROOT):
@$(MKDIRS) $(PRODUCT_ROOT)
$(PRODUCT_ROOT)/$(NAME): $(OFILE_DIR) $(PRODUCT_DEPENDS) $(PRODUCT_ROOT)
@(if [ "`$(ECHO) $(OFILES) $(OTHER_OFILES) | wc -w`" != " 0" ] ; then \
$(ECHO) $(CC) -nostdlib $(ALL_CFLAGS) -r $(PALETTELDFLAGS) -o $(PRODUCT_ROOT)/$(NAME) $(OFILES) $(OTHER_OFILES) $(OTHERLINKED); \
$(CC) -nostdlib $(ALL_CFLAGS) -r $(PALETTELDFLAGS) -o $(PRODUCT_ROOT)/$(NAME) $(OFILES) $(OTHER_OFILES) $(OTHERLINKED); \
else \
$(ECHO) Warning: Building empty palette. ; \
$(TOUCH) $(SYM_DIR)/$(NAME).c ; \
$(CC) $(CFLAGS) $(OTHER_CFLAGS) $(RC_CFLAGS) -c $(SYM_DIR)/$(NAME).c -o $(PRODUCT_ROOT)/$(NAME) ; \
fi ; \
$(CHMOD) a+x $(PRODUCT_ROOT)/$(NAME) )
$(DSTROOT)$(INSTALLDIR):
@$(MKDIRS) $(DSTROOT)$(INSTALLDIR)
before_install:: $(DSTROOT)$(INSTALLDIR)
$(RM) -rf $(DSTROOT)$(INSTALLDIR)/$(NAME).palette
after_install::
install:: palette before_install installhdrs $(OTHER_INSTALL_DEPENDS)
(cd $(SYMROOT); $(TAR) chf - $(NAME).palette) | (cd $(DSTROOT)$(INSTALLDIR); $(TAR) xf -)
$(STRIP) $(RELOCATABLE_STRIP_OPTS) $(DSTROOT)$(INSTALLDIR)/$(NAME).palette/$(NAME)
@(evaled_rc_archs="$(RC_ARCHS)"; \
obj_dir=`echo $$evaled_rc_archs | sed 's/ /_/g'`_obj ; \
$(MAKE) after_install "DSTROOT=$(DSTROOT)" \
"OBJROOT=$(OBJROOT)" \
"SYMROOT=$(SYMROOT)" \
"PRODUCT_ROOT = $(SYMROOT)/$(NAME).palette" \
"SYM_DIR = $(SYMROOT)/sym" \
"OFILE_DIR = $(OBJROOT)/$$obj_dir" \
"PROJ_CFLAGS = $(NORMAL_CFLAGS)" \
"APP_MAKEFILE_DIR = $(APP_MAKEFILE_DIR)" \
"RC_CFLAGS = $(RC_CFLAGS)" \
"RC_ARCHS = $(RC_ARCHS)" )
depend:: Makefile.dependencies $(SUBPROJECTS:.subproj=.depend) $(BUNDLES:.bproj=.depend)